<template>
    <div>
        <el-form ref="dataForm" :model="form" :rules="rules" label-width="0">
            <div>
                <h5>一般情况</h5>
                <el-divider></el-divider>
            </div>


            <el-descriptions :column="4" border>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label">
                        <span style="color: #f56c6c">* </span>
                        姓名
                    </template>
                    <div>{{ user.name }}</div>
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label">
                        <span style="color: #f56c6c">* </span>
                        身份证号码
                    </template>
                    <div>{{ user.sfz }}</div>
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 系统唯一识别码</template>
                    <div>{{ user.id_num }}</div>
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label">
                        <span style="color: #f56c6c">* </span> 电话号码
                    </template>
                    <div>{{ user.phone }}</div>
                </el-descriptions-item>
                <el-descriptions-item
                        labelStyle="width: 12%"
                        contentStyle="width: 88%"
                        span="4"
                >
                    <template slot="label">
                        <span style="color: #f56c6c">* </span> 联系地址
                    </template>
                    <div>
                        {{ user.province_name }} {{ user.city_name }}
                        {{ user.district_name }} {{ user.town_name }}
                        {{ user.village_name }} {{ user.address }}
                    </div>
                </el-descriptions-item>

                <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 15%">
          <template slot="label">身高</template>
          <el-form-item prop="height">
            <el-input
              v-model="form.height"
              placeholder="请输入100-200之间(厘米)"
              size="small"
            />
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 15%">
          <template slot="label">体重</template>
          <el-form-item prop="weight">
            <el-input
              v-model="form.weight"
              placeholder="请输入30-110(公斤)"
              size="small"
            />
          </el-form-item>
        </el-descriptions-item>

                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 收缩压</template>
                    <el-form-item prop="press2">
                        <el-select
                                v-model="form.press2"
                                filterable
                                placeholder="请选择收缩压"
                        >
                            <el-option
                                    v-for="item in press2_list"
                                    :key="item.value"
                                    :label="item.text"
                                    :value="item.value"
                            >
                            </el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>

                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 舒张压</template>
                    <el-form-item prop="press1">
                        <el-select
                                v-model="form.press1"
                                filterable
                                placeholder="请选择舒张压"
                        >
                            <el-option
                                    v-for="item in press1_list"
                                    :key="item.value"
                                    :label="item.text"
                                    :value="item.value"
                            >
                            </el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>

            </el-descriptions>
            <div>
                <h5>吸烟史</h5>
                <el-divider></el-divider>
            </div>

            <el-descriptions class="margin-top" :column="4" border >
        <el-descriptions-item labelStyle="width: 10.5%" contentStyle="width: 15%">
          <template slot="label" >吸纸烟情况</template>
          <el-form-item prop="smoke">
            <el-radio-group v-model="form.smoke"  :disabled="form.fresh_fruit == '' || form.fresh_fruit == '0'"
>
              <el-radio
                v-for="(item, index) in whetherList2"
                :label="item.value"
                :key="index"
                @change="smokeChange"

              >
                {{ item.text }}
              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-descriptions-item>

        <el-descriptions-item labelStyle="width: 8%" contentStyle="width: 10%">
          <template slot="label">每天吸纸烟数(支)</template>
          <el-form-item prop="years_after_operation_for_benign_diseases_age">
            <el-input
              v-model="form.years_after_operation_for_benign_diseases_age"
              :disabled="form.smoke == '' || form.smoke == '0' || form.smoke == '2'||form.fresh_fruit == '' || form.fresh_fruit == '0'"
              placeholder="请输入1-100之间(支)"


            />
          </el-form-item>
        </el-descriptions-item>


        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">吸纸烟年数(年)</template>
          <el-form-item prop="smoke_frequency">
            <el-input
              v-model="form.smoke_frequency"
              :disabled="form.smoke == '' || form.smoke == '0' ||form.fresh_fruit == '' || form.fresh_fruit == '0' || form.smoke == '2'"
              size="small"
              placeholder="请输入1-60之间(年)"

            />
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">戒纸烟年数(年)</template>
          <el-form-item prop="smoke_year">
            <el-input
              v-model="form.smoke_year"
              :disabled="form.smoke == '' || form.smoke == '0' ||form.fresh_fruit == '' || form.fresh_fruit == '0' || form.smoke == '1'"
              size="small"
              placeholder="请输入(年)"

            />
          </el-form-item>
        </el-descriptions-item>

        <el-descriptions-item labelStyle="width: 10.5%" contentStyle="width: 15%">
          <template slot="label">吸旱烟情况</template>
          <el-form-item prop="gastroenteritis">
            <el-radio-group v-model="form.gastroenteritis" :disabled="form.fresh_fruit == '' || form.fresh_fruit == '0'"
>>
              <el-radio
                v-for="(item, index) in whetherList2"
                :label="item.value"
                :key="index"
                @change="smokeChange1"

              >
                {{ item.text }}
              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-descriptions-item>


        <el-descriptions-item labelStyle="width: 8%" contentStyle="width: 10%">
          <template slot="label">每月吸旱烟数(两)</template>
          <el-form-item prop="other_illness_frequency" >
            <el-input
              v-model="form.other_illness_frequency"
              :disabled="form.gastroenteritis == '' || form.gastroenteritis == '0' || form.gastroenteritis == '2'||form.fresh_fruit == '' || form.fresh_fruit == '0'"
              size="small"
              placeholder="请输入(两)"

            />
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">吸旱烟年数(年)</template>
          <el-form-item prop="gastroenteritis_frequency">
            <el-input
              v-model="form.gastroenteritis_frequency"
              :disabled="form.gastroenteritis == '' || form.gastroenteritis == '0' || form.gastroenteritis == '2' ||form.fresh_fruit == '' || form.fresh_fruit == '0'"
              placeholder="请输入(年)"

              size="small"
            />
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">戒旱烟年数(年)</template>
          <el-form-item prop="anabrosis">
            <el-input
              v-model="form.anabrosis"
              :disabled="form.gastroenteritis == '' || form.gastroenteritis == '0' ||form.fresh_fruit == '' || form.fresh_fruit == '0'|| form.gastroenteritis == '1'"

              size="small"
              placeholder="请输入(年)"

            />
          </el-form-item>
        </el-descriptions-item>


        <el-descriptions-item labelStyle="width: 10.5%" contentStyle="width: 15%">
          <template slot="label">吸水烟情况</template>
          <el-form-item prop="anabrosis_frequency">
            <el-radio-group v-model="form.anabrosis_frequency"               :disabled="form.fresh_fruit == '' || form.fresh_fruit == '0'"
>
              <el-radio
                v-for="(item, index) in whetherList2"
                :label="item.value"
                :key="index"
                @change="smokeChange2"
              >
                {{ item.text }}
              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-descriptions-item>

        <el-descriptions-item labelStyle="width: 8%" contentStyle="width: 10%">
          <template slot="label">每月吸水烟数(两)</template>
          <el-form-item prop="beans">
            <el-input
              v-model="form.beans" :disabled="
                form.anabrosis_frequency == '' ||
                form.anabrosis_frequency == '2' ||
                form.anabrosis_frequency == '0'||form.fresh_fruit == '' || form.fresh_fruit == '0'
              "              size="small"
                            placeholder="请输入(两)"

            />
          </el-form-item>
        </el-descriptions-item>

        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">吸水烟年数(年)</template>
          <el-form-item prop="oesophagitis">
            <el-input
              v-model="form.oesophagitis"
              :disabled="
                form.anabrosis_frequency == '' ||
                form.anabrosis_frequency == '2' ||
                form.anabrosis_frequency == '0'||form.fresh_fruit == '' || form.fresh_fruit == '0'
              "
              size="small"
              placeholder="请输入(年)"

            />
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">戒水烟年数(年)</template>
          <el-form-item prop="oesophagitis_frequency">
            <el-input
              v-model="form.oesophagitis_frequency"
              :disabled="
                form.anabrosis_frequency == '' ||
                form.anabrosis_frequency == '1' ||
                form.anabrosis_frequency == '0'||form.fresh_fruit == '' || form.fresh_fruit == '0'
              "
              size="small"
              placeholder="请输入(年)"

            />
          </el-form-item>
        </el-descriptions-item>

      </el-descriptions>

      <el-descriptions class="margin-top" :column="4" border>
        <el-descriptions-item labelStyle="width: 10.5%" contentStyle="width: 15%">
          <template slot="label">是否在家或单位经常吸二手烟</template>
          <el-form-item prop="dental_implant">
            <el-radio-group v-model="form.dental_implant"     :disabled="form.fresh_fruit == '' || form.fresh_fruit == '0'
              " >
              <el-radio
                v-for="(item, index) in whetherList"
                :label="item.value"
                :key="index"
                @change="smokeChange3"
              >
                {{ item.text }}
              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 8%" contentStyle="width: 10%">
          <template slot="label">吸二手烟年数</template>
          <el-form-item prop="mulled">
            <el-input v-model="form.mulled"  placeholder="吸二手烟年数"
            :disabled="
                form.dental_implant == '' ||
                form.dental_implant == '0'||form.fresh_fruit == '' || form.fresh_fruit == '0'
              "
              size="small" />
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
        </el-descriptions-item>

      </el-descriptions>


      <div>
        <h5>油烟史</h5>
        <el-divider></el-divider>
      </div>
      <el-descriptions class="margin-top" :column="4" border>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">室内无通风条件下燃料使用情况</template>
          <el-form-item prop="water_source">
            <el-select
              v-model="form.water_source"
              filterable
              placeholder="请选择室内无通风条件下燃料使用情况"
              @change="waterSourceChange"

            >
              <el-option
                v-for="item in waterSourceList"
                :key="item.value"
                :label="item.text"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>

        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 15%">
          <template slot="label">室内无通风燃料使用年数</template>


          <el-form-item prop="seed_tooth">
            <el-input
              v-model="form.seed_tooth"   :disabled="form.water_source == '无'"
              placeholder="请输入室内无通风燃料使用年数"
              size="small"
            />
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">是否用油烟机</template>
          <el-form-item prop="tooth_loss">
            <el-radio-group v-model="form.tooth_loss">
              <el-radio
                v-for="(item, index) in whetherList"
                :label="item.value"
                :key="index"
              >
                {{ item.text }}
              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-descriptions-item>

        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
        </el-descriptions-item>
      </el-descriptions>

            <div>
                <h5>饮酒情况</h5>
                <el-divider></el-divider>
            </div>
            <el-descriptions class="margin-top" :column="4" border>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">是否有饮酒</template>
          <el-form-item prop="chicken_souffle">
            <el-radio-group v-model="form.chicken_souffle">
              <el-radio
                v-for="(item, index) in whetherList"
                :label="item.value"
                :key="index"
                >{{ item.text }}
              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
        </el-descriptions-item>      </el-descriptions>
      <el-descriptions class="margin-top" :column="4" border>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">是否饮啤酒</template>
          <el-form-item prop="drink">
            <el-select v-model="form.drink"   :disabled="
              form.chicken_souffle == '' || form.chicken_souffle == '0'
              "
              @change="gastroscopeChange"

              >
              <el-option
                v-for="item in whetherList1"
                :key="item.value"
                :label="item.text"
                :value="item.value"

              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">每天饮啤酒数量(ml)</template>
          <el-form-item prop="drink_frequency">
            <el-input
              v-model="form.drink_frequency"
              filterable
              placeholder="请输入饮酒量(ml)"
              :disabled="
                form.drink == '' || form.drink == '0' || form.drink == '4'
              "
            />

          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">饮啤酒年数</template>
          <el-form-item prop="drink_year">
            <el-input
              v-model="form.drink_year"
              filterable
              placeholder="请输入饮啤酒年数(年)"
              :disabled="
                form.drink == '' || form.drink == '0' || form.drink == '4'
              "
            />

          </el-form-item>
        </el-descriptions-item>


        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
        </el-descriptions-item>
      </el-descriptions>
      <el-descriptions class="margin-top" :column="4" border>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">是否白酒</template>
          <el-form-item prop="drink_tea">
            <el-select v-model="form.drink_tea" :disabled="
              form.chicken_souffle == '' || form.chicken_souffle == '0'
              "      @change="gastroscopeChange1">
                  <el-option
                v-for="item in whetherList1"
                :key="item.value"
                :label="item.text"
                :value="item.value"
                @change="gastroscopeChange1"

              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">每天白酒数量(两)</template>
          <el-form-item prop="drink_tea_frequency">
            <el-input
              v-model="form.drink_tea_frequency"
              filterable
              placeholder="请输入白酒数量(两)"
              :disabled="
                form.drink_tea == '' ||
                form.drink_tea == '0' ||
                form.drink_tea == '4' ||
                 form.chicken_souffle == '' || form.chicken_souffle == '0'
              "
            />

          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">饮白酒年数</template>
          <el-form-item prop="drink_tea_year">
            <el-input
              v-model="form.drink_tea_year"
              filterable
              placeholder="请输入饮白酒年数(年)"
              :disabled="
                form.drink_tea == '' ||
                form.drink_tea == '0' ||
                form.drink_tea == '4' ||
                 form.chicken_souffle == '' || form.chicken_souffle == '0'
              "
            />

          </el-form-item>
        </el-descriptions-item>

        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
        </el-descriptions-item>
      </el-descriptions>
      <el-descriptions class="margin-top" :column="4" border>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">是否饮其他酒</template>
          <el-form-item prop="tobacco">
            <el-select v-model="form.tobacco"      @change="gastroscopeChange2" :disabled="
              form.chicken_souffle == '' || form.chicken_souffle == '0'
              ">
             <el-option
                v-for="item in whetherList1"
                :key="item.value"
                :label="item.text"
                :value="item.value"
                @change="gastroscopeChange2"

              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">每天其他酒数量(两)</template>
          <el-form-item prop="tobacco_frequency">
            <el-input
              v-model="form.tobacco_frequency"
              filterable
              placeholder="请输入每天其他酒数量(两)"

                :disabled="
                form.tobacco == '' ||
                form.tobacco == '0' ||
                 form.chicken_souffle == '' || form.chicken_souffle == '0'|| form.tobacco == '4'
              "
            />

          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">其他酒年数</template>
          <el-form-item prop="tobacco_year">
            <el-input
              v-model="form.tobacco_year"
              filterable
              placeholder="请输入其他酒年数(两)"
              :disabled="
                form.tobacco == '' ||
                form.tobacco == '0' ||
                 form.chicken_souffle == '' || form.chicken_souffle == '0'|| form.tobacco == '4'
              "
            />

          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
        </el-descriptions-item>
      </el-descriptions>

            <div>
                <h5>饮茶情况</h5>
                <el-divider></el-divider>
            </div>

            <el-descriptions class="margin-top" :column="4" border>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 是否有饮茶情况</template>
                    <el-form-item prop="low_grade_intraepithelial_neoplasia">
                        <el-radio-group v-model="form.low_grade_intraepithelial_neoplasia">
                            <el-radio
                                    v-for="(item, index) in whetherList"
                                    :label="item.value"
                                    :key="index"
                            >{{ item.text }}
                            </el-radio>
                        </el-radio-group>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                </el-descriptions-item>
            </el-descriptions>


            <el-descriptions class="margin-top" :column="4" border>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">饮红茶</template>
          <el-form-item prop="black_tea">
            <el-radio-group v-model="form.black_tea"  :disabled="

                 form.low_grade_intraepithelial_neoplasia == '' || form.low_grade_intraepithelial_neoplasia == '0'
              ">
              <el-radio
                v-for="(item, index) in whetherList"
                :label="item.value"
                :key="index"
                @change="blackTeachange"
              >
                {{ item.text }}
              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">每月饮红茶数量(两)</template>
          <el-form-item prop="pernicious_anemia">
            <el-input
              v-model="form.pernicious_anemia"
              filterable
              placeholder="每月饮红茶数量(两)"
              :disabled="
                form.black_tea == '' ||
                form.black_tea == '0' ||
                form.low_grade_intraepithelial_neoplasia == '' || form.low_grade_intraepithelial_neoplasia == '0'

              "
            />

          </el-form-item>
        </el-descriptions-item>

        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">饮红茶年数</template>
          <el-form-item prop="black_tea_age">
            <el-input
              v-model="form.black_tea_age"
              filterable
              placeholder="饮红茶年数(年)"
              :disabled="
                form.black_tea == '' ||
                form.black_tea == '0' ||
                form.low_grade_intraepithelial_neoplasia == '' || form.low_grade_intraepithelial_neoplasia == '0'

              "
            />

          </el-form-item>
        </el-descriptions-item>

        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
        </el-descriptions-item>
      </el-descriptions>
      <el-descriptions class="margin-top" :column="4" border>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">饮绿茶</template>
          <el-form-item prop="green_tea">
            <el-radio-group v-model="form.green_tea" :disabled="

              form.low_grade_intraepithelial_neoplasia == '' || form.low_grade_intraepithelial_neoplasia == '0'
           ">
              <el-radio
                v-for="(item, index) in whetherList"
                :label="item.value"
                :key="index"
                @change="blackTeachange1"

              >
                {{ item.text }}
              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">每月饮绿数量(两)</template>
          <el-form-item prop="pernicious_anemia_age">
            <el-input
              v-model="form.pernicious_anemia_age"
              filterable
              placeholder="每月饮绿数量(两)"
              :disabled="
                form.green_tea == '' ||
                form.green_tea == '0' ||
                form.low_grade_intraepithelial_neoplasia == '' || form.low_grade_intraepithelial_neoplasia == '0'

              "
            />

          </el-form-item>
        </el-descriptions-item>

        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">饮绿茶年数</template>
          <el-form-item prop="green_tea_age">
            <el-input
              v-model="form.green_tea_age"
              filterable
              placeholder="饮绿茶年数(年)"
              :disabled="
                form.green_tea == '' ||
                form.green_tea == '0' ||
                form.low_grade_intraepithelial_neoplasia == '' || form.low_grade_intraepithelial_neoplasia == '0'

              "
            />

          </el-form-item>
        </el-descriptions-item>

        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
        </el-descriptions-item>
      </el-descriptions>
      <el-descriptions class="margin-top" :column="4" border>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">是否饮花茶</template>
          <el-form-item prop="barrett">
            <el-radio-group v-model="form.barrett"  :disabled="

              form.low_grade_intraepithelial_neoplasia == '' || form.low_grade_intraepithelial_neoplasia == '0'
           ">
              <el-radio
                v-for="(item, index) in whetherList"
                :label="item.value"
                :key="index"
                @change="blackTeachange2"

              >
                {{ item.text }}
              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">每月花茶数量(两)</template>
          <el-form-item prop="low_grade_intraepithelial_neoplasia_age">
            <el-input
              v-model="form.low_grade_intraepithelial_neoplasia_age"
              filterable
              placeholder="每月花茶数量(两)"
              :disabled="
                form.barrett == '' || form.barrett == '0' ||  form.barrett == '' || form.barrett == '0'

              "
              />
          </el-form-item>
        </el-descriptions-item>



        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">饮花茶年数</template>
          <el-form-item prop="barrett_age">
            <el-input
              v-model="form.barrett_age"
              filterable
              placeholder="饮花茶年数"
              :disabled="
                form.barrett == '' || form.barrett == '0' ||  form.barrett == '' || form.barrett == '0'

              "
             />

          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
        </el-descriptions-item>
      </el-descriptions>
            <el-descriptions class="margin-top" :column="4" border></el-descriptions>
            <el-descriptions class="margin-top" :column="4" border></el-descriptions>

            <div>
                <h5>职业接触史</h5>
                <el-divider></el-divider>
            </div>

            <!-- <el-descriptions class="margin-top" :column="4" border>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 是否有职业接触</template>
                    <el-form-item prop="gastroscope">
                        <el-radio-group v-model="form.gastroscope">
                            <el-radio
                                    v-for="(item, index) in whetherList"
                                    :label="item.value"
                                    :key="index"
                            >{{ item.text }}
                            </el-radio>
                        </el-radio-group>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                </el-descriptions-item>
            </el-descriptions> -->

            <el-descriptions class="margin-top" :column="4" border>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label"> 工作中是否接触石棉</template>
          <el-form-item prop="reflux_esophagitis">
            <el-radio-group v-model="form.reflux_esophagitis"  :disabled="
                form.gastroscope == '' || form.gastroscope == '0'"
>
              <el-radio
                v-for="(item, index) in whetherList"
                :label="item.value"
                :key="index"
                @change="refluxesophagitis"
                >{{ item.text }}

              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">工作中接触石棉年数</template>
          <el-form-item prop="reflux_esophagitis_age">
               <el-input  v-model="form.reflux_esophagitis_age"       placeholder="请正确填写工作中接触石棉年数"      :disabled="
                form.reflux_esophagitis == '' || form.reflux_esophagitis == '0' ||  form.gastroscope == '' || form.gastroscope == '0'"/>
          </el-form-item>
        </el-descriptions-item>

        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">工作中是否接触铬酸盐</template>
          <el-form-item prop="non_atrophic_gastritis">
            <el-radio-group v-model="form.non_atrophic_gastritis" :disabled="
                form.gastroscope == '' || form.gastroscope == '0'">
              <el-radio
                v-for="(item, index) in whetherList"
                :label="item.value"
                :key="index"
                @change="refluxesophagitis1"

              >
                {{ item.text }}
              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">工作中接触铬酸盐年数</template>
          <el-form-item prop="non_atrophic_gastritis_age">
            <el-input
              v-model="form.non_atrophic_gastritis_age"
              filterable

              placeholder="请正确填写工作中接触铬酸盐年数"
              :disabled="
                form.non_atrophic_gastritis == '' ||
                form.non_atrophic_gastritis == '0'  ||  form.gastroscope == '' || form.gastroscope == '0'"

            />


          </el-form-item>
        </el-descriptions-item>
      </el-descriptions>
      <el-descriptions class="margin-top" :column="4" border>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">工作中是否接触焦炉逸散物</template>
          <el-form-item prop="gastric_and_duodenal_ulcer">
            <el-radio-group v-model="form.gastric_and_duodenal_ulcer" :disabled="
                form.gastroscope == '' || form.gastroscope == '0'">
              <el-radio
                v-for="(item, index) in whetherList"
                :label="item.value"
                :key="index"
                @change="refluxesophagitis3"

                >{{ item.text }}
              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">工作中接触焦炉逸散物年数</template>
          <el-form-item prop="gastric_and_duodenal_ulcer_age">
            <el-input
              v-model="form.gastric_and_duodenal_ulcer_age"
              filterable
              placeholder="请正确填写工作中接触焦炉逸散物年数"
              :disabled="
                form.gastric_and_duodenal_ulcer == '' ||
                form.gastric_and_duodenal_ulcer == '0'  ||  form.gastroscope == '' || form.gastroscope == '0'"

            />

          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">工作中是否接触砷</template>
          <el-form-item prop="gastric_polyp">
            <el-radio-group v-model="form.gastric_polyp" :disabled="
                form.gastroscope == '' || form.gastroscope == '0'">
              <el-radio
                v-for="(item, index) in whetherList"
                :label="item.value"
                :key="index"
                @change="refluxesophagitis4"

              >
                {{ item.text }}
              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">工作中接触砷年数</template>
          <el-form-item prop="gastric_polyp_age">
            <el-input
              v-model="form.gastric_polyp_age"
              filterable
              placeholder="请正确填写工作中接触砷年数"
              :disabled="form.gastric_polyp == '' || form.gastric_polyp == '0'  ||  form.gastroscope == '' || form.gastroscope == '0'"
            />

          </el-form-item>
        </el-descriptions-item>
      </el-descriptions>
      <el-descriptions class="margin-top" :column="4" border>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label"> 工作中是否接触氯甲醚</template>
          <el-form-item prop="advanced_neoplasia_and_early_cancer" >
            <el-radio-group v-model="form.advanced_neoplasia_and_early_cancer" :disabled="
                form.gastroscope == '' || form.gastroscope == '0'">
              <el-radio
                v-for="(item, index) in whetherList"
                :label="item.value"
                :key="index"
                @change="refluxesophagitis5"

                >{{ item.text }}
              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">工作中接触氯甲醚年数</template>
          <el-form-item prop="advanced_neoplasia_and_early_cancer_age">
            <el-input
              v-model="form.advanced_neoplasia_and_early_cancer_age"
              filterable
              placeholder="请正确填写工作中接触氯甲醚年数"
              :disabled="
                form.advanced_neoplasia_and_early_cancer == '' ||
                form.advanced_neoplasia_and_early_cancer == '0'  ||  form.gastroscope == '' || form.gastroscope == '0'
              "
            />

          </el-form-item>
        </el-descriptions-item>

        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">工作中是否接触氡</template>
          <el-form-item prop="remnant_stomach">
            <el-radio-group v-model="form.remnant_stomach" :disabled="
                form.gastroscope == '' || form.gastroscope == '0'">
              <el-radio
                v-for="(item, index) in whetherList"
                :label="item.value"
                :key="index"
                @change="refluxesophagitis6"

              >
                {{ item.text }}
              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 10%">
          <template slot="label">工作中接触氡年数</template>
          <el-form-item prop="remnant_stomach_age">
            <el-input
              v-model="form.remnant_stomach_age"
              filterable
              placeholder="请正确填写工作中接触氡年数"
              :disabled="
                form.remnant_stomach == '' || form.remnant_stomach == '0'  ||  form.gastroscope == '' || form.gastroscope == '0'
              "
           />

          </el-form-item>
        </el-descriptions-item>
        <!--  -->
      </el-descriptions>


            <div>
                <h5>既往肺部疾病史</h5>
                <el-divider></el-divider>
            </div>
            <!-- <el-descriptions class="margin-top" :column="4" border>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 是否做过肺部疾病史</template>
                    <el-form-item prop="fresh_vegetables">
                        <el-radio-group v-model="form.fresh_vegetables">
                            <el-radio
                                    v-for="(item, index) in whetherList"
                                    :label="item.value"
                                    :key="index"
                            >{{ item.text }}
                            </el-radio>
                        </el-radio-group>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                </el-descriptions-item>
            </el-descriptions> -->

            <el-descriptions class="margin-top" :column="4" border>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 是否患有哮喘</template>
                    <el-form-item prop="gastric_mucosa">
                        <el-radio-group v-model="form.gastric_mucosa" :disabled="
                form.fresh_vegetables == '' || form.fresh_vegetables == '0'
              ">
                            <el-radio
                                    v-for="(item, index) in whetherList"
                                    :label="item.value"
                                    :key="index"
                                    @change="gastricMucosa"
                            >
                                {{ item.text }}
                            </el-radio>
                        </el-radio-group>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 诊断哮喘年龄</template>

                    <el-form-item prop="gastric_mucosa_age">
                        <el-input
                                v-model="form.gastric_mucosa_age"
                                placeholder="请输入诊断哮喘年龄"
                                size="small"
                                :disabled="
                form.gastric_mucosa == '' ||
                form.gastric_mucosa == '0' ||form.fresh_vegetables == '' || form.fresh_vegetables == '0'
              "
                        />
                    </el-form-item>
                </el-descriptions-item>

                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 是否患有矽肺</template>
                    <el-form-item prop="helicobacter_pylori_infection">
                        <el-radio-group v-model="form.helicobacter_pylori_infection" :disabled="
                form.fresh_vegetables == '' || form.fresh_vegetables == '0'
              ">
                            <el-radio
                                    v-for="(item, index) in whetherList"
                                    :label="item.value"
                                    :key="index"
                                    @change="gastricMucosa1"

                            >{{ item.text }}
                            </el-radio>
                        </el-radio-group>
                    </el-form-item>
                </el-descriptions-item>


                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 诊断矽肺年龄</template>

                    <el-form-item prop="helicobacter_pylori_infection_age">
                        <el-input
                                v-model="form.helicobacter_pylori_infection_age"
                                placeholder="请输入诊断矽肺年龄"
                                size="small"

                                :disabled="
                form.helicobacter_pylori_infection == '' ||
                form.helicobacter_pylori_infection == '0' ||form.fresh_vegetables == '' || form.fresh_vegetables == '0'

              "
                        />
                    </el-form-item>
                </el-descriptions-item>

            </el-descriptions>
            <el-descriptions class="margin-top" :column="4" border>

                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 是否患有慢性支气管炎</template>
                    <el-form-item prop="hepatitis">
                        <el-radio-group v-model="form.hepatitis" :disabled="
                form.fresh_vegetables == '' || form.fresh_vegetables == '0' ||form.fresh_vegetables == '' || form.fresh_vegetables == '0'
              ">
                            <el-radio
                                    v-for="(item, index) in whetherList"
                                    :label="item.value"
                                    :key="index"
                                    @change="gastricMucosa2"

                            >
                                {{ item.text }}
                            </el-radio>
                        </el-radio-group>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 诊断慢性支气管炎年龄</template>
                    <el-form-item prop="hepatitis_frequency">
                        <el-input
                                v-model="form.hepatitis_frequency"
                                filterable
                                placeholder="请输入诊断慢性支气管炎年龄"
                                :disabled="form.hepatitis == '' || form.hepatitis == '0' ||form.fresh_vegetables == '' || form.fresh_vegetables == '0'  "
                        />

                    </el-form-item>
                </el-descriptions-item>

                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 是否患有肺结核</template>
                    <el-form-item prop="respiratory_tract">
                        <el-radio-group v-model="form.respiratory_tract" :disabled="
                form.fresh_vegetables == '' || form.fresh_vegetables == '0'
              ">
                            <el-radio
                                    v-for="(item, index) in whetherList"
                                    :label="item.value"
                                    :key="index"
                                    @change="gastricMucosa3"

                            >
                                {{ item.text }}
                            </el-radio>
                        </el-radio-group>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 诊断肺结核年龄</template>
                    <el-form-item prop="respiratory_tract_age">
                        <el-input
                                v-model="form.respiratory_tract_age"
                                filterable
                                placeholder="请输入诊断肺结核年龄"
                                :disabled="
                form.respiratory_tract == '' || form.respiratory_tract == '0' ||form.fresh_vegetables == '' || form.fresh_vegetables == '0'
              "
                        />


                    </el-form-item>
                </el-descriptions-item>
            </el-descriptions>
            <el-descriptions class="margin-top" :column="4" border>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 是否患有慢性阻塞性肺病</template>
                    <el-form-item prop="deep_fry">
                        <el-radio-group v-model="form.deep_fry" :disabled="
                form.fresh_vegetables == '' || form.fresh_vegetables == '0'
              ">
                            <el-radio
                                    v-for="(item, index) in whetherList"
                                    :label="item.value"
                                    :key="index"
                                    @change="gastricMucosa4"

                            >
                                {{ item.text }}
                            </el-radio>
                        </el-radio-group>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 诊断慢性阻塞性肺病年龄</template>
                    <el-form-item prop="mildew">
                        <el-input
                                v-model="form.mildew"
                                filterable
                                placeholder="请输入诊断慢性阻塞性肺病年龄"
                                :disabled="
                form.deep_fry == '' || form.deep_fry == '0' ||form.fresh_vegetables == '' || form.fresh_vegetables == '0'
              "
                        />

                    </el-form-item>
                </el-descriptions-item>


                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 是否患有肺气肿</template>
                    <el-form-item prop="gardiac_intestinal_metaplasia">
                        <el-radio-group v-model="form.gardiac_intestinal_metaplasia" :disabled="
                form.fresh_vegetables == '' || form.fresh_vegetables == '0'
              ">
                            <el-radio
                                    v-for="(item, index) in whetherList"
                                    :label="item.value"
                                    :key="index"
                                    @change="gastricMucosa5"

                            >
                                {{ item.text }}
                            </el-radio>
                        </el-radio-group>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item labelStyle="width: 12%" contentStyle="width: 13%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 诊断肺气肿年龄</template>
                    <el-form-item prop="gardiac_intestinal_metaplasia_age">
                        <el-input
                                v-model="form.gardiac_intestinal_metaplasia_age"
                                filterable
                                placeholder="请输入诊断肺气肿年龄"
                                :disabled="
                form.fresh_vegetables == '' ||
                form.fresh_vegetables == '0' ||form.gardiac_intestinal_metaplasia == '' || form.gardiac_intestinal_metaplasia == '0'
              "
                        />

                    </el-form-item>
                </el-descriptions-item>

            </el-descriptions>
            <div>
                <h5>肿瘤家族史</h5>
                <el-divider></el-divider>
            </div>
            <el-descriptions class="margin-top" :column="4" border>
                <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 70%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 是否有肿瘤家族史</template>
                    <el-form-item prop="tumour">
                        <el-radio-group v-model="form.tumour">
                            <el-radio
                                    v-for="(item, index) in whetherList"
                                    :label="item.value"
                                    :key="index"
                            >{{ item.text }}
                            </el-radio
                            >
                        </el-radio-group>
                    </el-form-item>
                </el-descriptions-item>
            </el-descriptions>

            <div>
                <el-table
                        :data="this.form.tumour_json"
                        class="el-descriptions__table is-bordered"
                        v-if="render"
                >
                    <el-table-column prop="address" label="亲属关系" min-width="20%">
                        <template slot-scope="scope">
                            <el-select
                                    v-model="scope.row.kinship"
                                    filterable
                                    clearable
                                    :disabled="form.tumour == 0 || form.tumour == ''"
                                    style="width: 100%"
                            >
                                <el-option
                                        :key="item.value"
                                        v-for="item in kinshipList"
                                        :value="item.text"
                                >{{ item.text }}
                                </el-option>
                            </el-select>
                        </template>
                    </el-table-column>

                    <el-table-column prop="address" label="肿瘤名称" min-width="20%">
                        <template slot-scope="scope">
                            <el-select
                                    v-model="scope.row.tumour_name"
                                    filterable
                                    clearable
                                    :disabled="form.tumour == 0 || form.tumour == ''"
                                    style="width: 100%"
                            >
                                <el-option
                                        :key="item.value"
                                        v-for="item in tumourNameList"
                                        :value="item.text"
                                >{{ item.text }}
                                </el-option>
                            </el-select>
                        </template>
                    </el-table-column>

                    <el-table-column prop="address" label="其他选项" min-width="20%">
                        <template slot-scope="scope">
                            <el-input
                                    v-if="scope.row.tumour_name == '其他'"
                                    v-model="scope.row.tumour_other_name"
                                    :disabled="form.tumour == 0 || form.tumour == ''"
                            ></el-input>
                        </template>
                    </el-table-column>

                    <el-table-column prop="address" label="操作" min-width="20%">
                        <template slot-scope="scope">
                            <el-button
                                    type="primary"
                                    class="el-icon-plus"
                                    @click="addItem(scope.row)"
                                    size="small"
                                    :disabled="form.tumour == 0 || form.tumour == ''"
                            >添加
                            </el-button>
                            <el-button
                                    type="danger"
                                    class="el-icon-minus"
                                    @click="deleteItem(scope.$index)"
                                    size="small"
                                    :disabled="form.tumour == 0 || form.tumour == ''"
                            >删除
                            </el-button>
                        </template>
                    </el-table-column>
                </el-table>
            </div>

            <el-descriptions class="margin-top" :column="4" border>
                <el-descriptions-item labelStyle="width: 10%" contentStyle="width: 70%">
                    <template slot="label"><span style="color: #f56c6c">* </span> 是否高危</template>
                    <el-form-item prop="tumour">
                        <el-radio-group v-model="form.high_risk">
                            <el-radio
                                    v-for="(item, index) in whetherList"
                                    :key="index"
                                    :label="item.value"
                            >{{ item.text }}
                            </el-radio>
                        </el-radio-group>
                    </el-form-item>
                </el-descriptions-item>
            </el-descriptions>

        </el-form>

        <div class="footer" v-if="dialogStatus !== 'formal'">
            <el-button @click="handleDialogVisible(false)" size="small"
            >取 消
            </el-button>
            <el-button
                    type="primary"
                    @click="!form.id ? create() : update()"
                    size="small"
            >确 定
            </el-button>
        </div>

    </div>
</template>

<script>
    import {
        createQuestionaires,
        updateRqscQuestionaires,
        readQuestionaires,
    } from "@/api/questionaires/questionaires";

    export default {
        props: ["rowData", "dialogStatus"],
        components: {},
        data() {
            return {
                render: true,
                user: {},
                form: {
                    id: "", //ID
                    user_id: "",
                    type: "12",
                    water_source: "无",
                    address: "",
                    phone: "",
                    institution_id: "",
                    other_illness_frequency: "",
                    tooth_loss: "0",
                    smoke: "0",
                    smoke_frequency: "",
                    smoke_year: "",
                    gastroenteritis: "0",
                    gastroenteritis_frequency: "",
                    anabrosis: "",
                    anabrosis_frequency: "0",
                    oesophagitis: "",
                    oesophagitis_frequency: "",
                    dental_implant: "0",
                    gastroscope: "1",
                    mulled: "",
                    tobacco: "0",
                    tobacco_frequency: "",
                    tobacco_year: "",
                    drink: "0",
                    drink_frequency: "",
                    drink_year: "",
                    drink_tea: "0",
                    drink_tea_frequency: "",
                    drink_tea_year: "",
                    fresh_vegetables: "1",
                    fresh_fruit: "1",
                    deep_fry: "0",
                    height: "",
                    weight: "",
                    press1: "",
                    press2: "",
                    black_tea: "0",
                    black_tea_age: "",
                    pernicious_anemia: "",
                    green_tea: "0",
                    green_tea_age: "",
                    pernicious_anemia_age: "",
                    seed_tooth: "",
                    reflux_esophagitis: "0",
                    reflux_esophagitis_age: "",
                    non_atrophic_gastritis_age: "",
                    non_atrophic_gastritis: "0",
                    gastric_and_duodenal_ulcer_age: "",
                    gastric_and_duodenal_ulcer: "0",
                    gastric_polyp_age: "",
                    gastric_polyp: "0",
                    advanced_neoplasia_and_early_cancer_age: "",
                    advanced_neoplasia_and_early_cancer: "0",
                    years_after_operation_for_benign_diseases_age: "",
                    remnant_stomach_age: "",
                    remnant_stomach: "0",
                    gastric_mucosa: "0",
                    gastric_mucosa_age: "",
                    helicobacter_pylori_infection_age: "",
                    helicobacter_pylori_infection: "0",
                    chicken_souffle: "0",
                    hepatitis: "0",
                    hepatitis_frequency: "",
                    respiratory_tract: "0",
                    respiratory_tract_age: "",
                    gardiac_intestinal_metaplasia_age: "",
                    gardiac_intestinal_metaplasia: "0",
                    average_revenue: "0",
                    low_grade_intraepithelial_neoplasia: "0",
                    barrett: "0",
                    barrett_age: "",
                    low_grade_intraepithelial_neoplasia_age: "",
                    tumour_json: [],
                    tumour: "0", //有没有人得过肿瘤
                    high_risk: "", //是否高危

                },
                drink_year_list: [
                    {
                        text: "<1年",
                        value: "<1年",
                    },
                    {
                        text: "1-5年",
                        value: "1-5年",
                    },
                    {
                        text: "6-10年",
                        value: "6-10年",
                    },

                    {
                        text: ">10年",
                        value: ">10年",
                    },
                ],
                kinshipList: [{
                    text: "祖父母",
                    value: "祖父母",
                },
                    {
                        text: "父亲",
                        value: "父亲",
                    },
                    {
                        text: "母亲",
                        value: "母亲",
                    },
                    {
                        text: "伯伯",
                        value: "伯伯",
                    },
                    {
                        text: "叔叔",
                        value: "叔叔",
                    },
                    {
                        text: "姑妈",
                        value: "姑妈",
                    },

                    {
                        text: "外祖父",
                        value: "外祖父",
                    },
                    {
                        text: "外祖母",
                        value: "外祖母",
                    },
                    {
                        text: "舅",
                        value: "舅",
                    },
                    {
                        text: "姨",
                        value: "姨",
                    },
                    {
                        text: "兄",
                        value: "兄",
                    },
                    {
                        text: "弟",
                        value: "弟",
                    },
                    {
                        text: "姐",
                        value: "姐",
                    },
                    {
                        text: "妹",
                        value: "妹",
                    },
                    {
                        text: "儿子",
                        value: "儿子",
                    },
                    {
                        text: "女儿",
                        value: "女儿",
                    },
                ],

                drinkList: [
                    {
                        value: "0",
                        text: "不饮酒",
                    },
                    {
                        value: "1",
                        text: "一周1~2次",
                    },
                    {
                        value: "2",
                        text: "一周3~5次",
                    },
                    {
                        value: "3",
                        text: "一周5次以上",
                    },
                ],
                press1_list: [
                    {
                        value: "80mmHg以下",
                        text: "80mmHg以下",
                    },
                    {
                        value: "80mmHg-89mmHg",
                        text: "80mmHg-89mmHg",
                    },
                    {
                        value: "90mmHg-109mmHg",
                        text: "90mmHg-109mmHg",
                    },
                    {
                        value: "110mmHg以上",
                        text: "110mmHg以上",
                    },
                ],

                press2_list: [
                    {
                        value: "120mmHg以下",
                        text: "120mmHg以下",
                    },
                    {
                        value: "120mmHg-139mmHg",
                        text: "120mmHg-139mmHg",
                    },
                    {
                        value: "140mmHg-179mmHg",
                        text: "140mmHg-179mmHg",
                    },
                    {
                        value: "180mmHg以上",
                        text: "180mmHg以上",
                    },
                ],
                whetherList: [
                    {
                        text: "否",
                        value: "0",
                    },
                    {
                        text: "是",
                        value: "1",
                    },
                ],

                whetherList2: [
                    {
                        text: "从未",
                        value: "0",
                    },
                    {
                        text: "现在",
                        value: "1",
                    },
                    {
                        text: "曾经",
                        value: "2",
                    },
                ],
                whetherList1: [
                    {
                        text: "从不饮酒",
                        value: "0",
                    },
                    {
                        text: "偶尔饮酒",
                        value: "2",
                    },
                    {
                        text: "经常饮酒",
                        value: "3",
                    },
                    {
                        text: "已戒酒 ",
                        value: "4",
                    },
                    {
                        text: "其他",
                        value: "5",
                    },
                ],
                tumourNameList: [
                    {
                        text: "肺癌",
                        value: "肺癌",
                    },
                    {
                        text: "乳腺癌",
                        value: "乳腺癌",
                    },
                    {
                        text: "结直肠癌",
                        value: "结直肠癌",
                    },
                    {
                        text: "肝癌",
                        value: "肝癌",
                    },
                    {
                        text: "胃癌",
                        value: "胃癌",
                    },
                    {
                        text: "食管癌",
                        value: "食管癌",
                    },
                    {
                        text: "子宫颈癌",
                        value: "子宫颈癌",
                    },
                    {
                        text: "甲状腺癌",
                        value: "甲状腺癌",
                    },
                    {
                        text: "前列腺癌",
                        value: "前列腺癌",
                    },
                    {
                        text: "子宫体癌",
                        value: "子宫体癌",
                    },
                    {
                        text: "口腔和咽喉肿瘤",
                        value: "口腔和咽喉肿瘤",
                    },
                    {
                        text: "鼻咽癌",
                        value: "鼻咽癌",
                    },
                    {
                        text: "肛门癌",
                        value: "肛门癌",
                    },
                    {
                        text: "胆囊癌",
                        value: "胆囊癌",
                    },
                    {
                        text: "胰腺癌",
                        value: "胰腺癌",
                    },
                    {
                        text: "喉癌",
                        value: "喉癌",
                    },
                    {
                        text: "骨肿瘤",
                        value: "骨肿瘤",
                    },
                    {
                        text: "皮肤黑色素瘤",
                        value: "皮肤黑色素瘤",
                    },
                    {
                        text: "卵巢癌",
                        value: "卵巢癌",
                    },
                    {
                        text: "睾丸癌",
                        value: "睾丸癌",
                    },
                    {
                        text: "肾癌",
                        value: "肾癌",
                    },
                    {
                        text: "膀胱癌",
                        value: "膀胱癌",
                    },
                    {
                        text: "脑和中枢神经系统肿瘤",
                        value: "脑和中枢神经系统肿瘤",
                    },
                    {
                        text: "淋巴瘤",
                        value: "淋巴瘤",
                    },
                    {
                        text: "白血病",
                        value: "白血病",
                    },
                    {
                        text: "其他",
                        value: "其他",
                    },
                ],
                waterSourceList: [
                    {
                        value: "无",
                        text: "无",
                    },
                    {
                        value: "煤",
                        text: "煤",
                    },
                    {
                        value: "煤气",
                        text: "煤气",
                    },
                    {
                        value: "汽油/柴油",
                        text: "汽油/柴油",
                    },
                ],

                drink1_list: [
                    {
                        text: "<1年",
                        value: "<1年",
                    },
                    {
                        text: "1-5年",
                        value: "1-5年",
                    },
                    {
                        text: "6-10年",
                        value: "6-10年",
                    },

                    {
                        text: ">10年",
                        value: ">10年",
                    },
                ],
                drink_frequency_list: [
                    {
                        text: "<2两",
                        value: "<2两",
                    },
                    {
                        text: "2-5两",
                        value: "2-5两",
                    },

                    {
                        text: "6-10两",
                        value: "6-10两",
                    },

                    {
                        text: ">10两",
                        value: ">10两",
                    },
                ],
                atrophicGastritisList: [
                    {
                        text: "<1年",
                        value: "1",
                    },
                    {
                        text: "1~5年",
                        value: "2",
                    },
                    {
                        text: "6~10年",
                        value: "3",
                    },
                    {
                        text: ">10年",
                        value: "4",
                    },
                ],
                rules: {
                    height: [{required: true, message: "身高必填", trigger: "blur"}],
                    weight: [{required: true, message: "体重必填", trigger: "blur"}],

                    tumour: [
                        {required: true, message: "有没有人得过肿瘤必填", trigger: "blur"},
                    ],
                    press1: [
                        {
                            required: true,
                            message: "舒张压必填",
                            trigger: "blur",
                        },
                    ],
                    press2: [
                        {
                            required: true,
                            message: "收缩压必填",
                            trigger: "blur",
                        },
                    ],
                    chicken_souffle: [
                        {
                            required: true,
                            message: "油烟机必填",
                            trigger: "blur",
                        },
                    ],

                    water_source: [
                        {
                            required: true,
                            message: "室内无通风条件下燃料使用必填",
                            trigger: "blur",
                        },
                    ],







        dental_implant: [
          {
            required: false,
            message: "吸二手烟年数必填",
            trigger: "blur",
          },
        ],
        years_after_operation_for_benign_diseases_age: [
          {
            required: false,
            message: "每天吸纸烟数必填",
            trigger: "blur",
          },
        ],



                  smoke_year: [
          { required: false, message: '吸纸烟年数必填', trigger: 'blur' },
          {  required: false, message: '吸纸烟年数必填', trigger: 'blur' },
          { validator: (rule, value, callback) => {
            if (value!=0||value=='') {

                callback();
              } else {
                callback(new Error('请输入大于0的数字'));
              }
            },
            trigger: 'blur'
          }
        ],

        other_illness_frequency: [
          {
            required: false,
            message: "每月吸旱烟数必填",
            trigger: "blur",
          },
        ],
        gastroenteritis_frequency: [
          {
            required: false,
            message: "吸旱烟年数必填",
            trigger: "blur",
          },
        ],

      anabrosis: [
        { required: false, message: '戒旱烟年数必填', trigger: 'blur' },
        {  required: false, message: '戒旱烟年数必填', trigger: 'blur' },
        { validator: (rule, value, callback) => {
          if (value!=0||value=='') {

              callback();
            } else {
              callback(new Error('请输入大于0的数字'));
            }
          },
          trigger: 'blur'
        }
      ],



        beans: [
          {
            required: false,
            message: "每月吸水烟数必填",
            trigger: "blur",
          },
        ],
        oesophagitis: [
          {
            required: false,
            message: "吸水烟年数必填",
            trigger: "blur",
          },
        ],



      oesophagitis_frequency: [
        { required: false, message: '戒水烟年数必填', trigger: 'blur' },
        {  required: false, message: '戒水烟年数必填', trigger: 'blur' },
        { validator: (rule, value, callback) => {
          if (value!=0||value=='') {

              callback();
            } else {
              callback(new Error('请输入大于0的数字'));
            }
          },
          trigger: 'blur'
        }
      ],


        mulled: [
          {
            required: false,
            message: "吸二手烟年数必填",
            trigger: "blur",
          },
        ],



        drink_frequency: [
          {
            required: false,
            message: "每天饮啤酒数量必填",
            trigger: "blur",
          },
        ],

        drink_year: [
          {
            required: false,
            message: "饮啤酒年数必填",
            trigger: "blur",
          },
        ],

        drink_tea_frequency: [
          {
            required: false,
            message: "每天白酒数量必填",
            trigger: "blur",
          },
        ],

        drink_tea_year: [
          {
            required: false,
            message: "饮白酒年数必填",
            trigger: "blur",
          },
        ],

        tobacco_frequency: [
          {
            required: false,
            message: "每天其他酒数量必填",
            trigger: "blur",
          },
        ],

        tobacco_year: [
          {
            required: false,
            message: "其他酒年数必填",
            trigger: "blur",
          },
        ],

        pernicious_anemia: [
          {
            required: false,
            message: "每月饮红茶数量必填",
            trigger: "blur",
          },
        ],
        black_tea_age: [
          {
            required: false,
            message: "饮红茶年数必填",
            trigger: "blur",
          },
        ],

        pernicious_anemia_age: [
          {
            required: false,
            message: "饮每月饮绿数量必填",
            trigger: "blur",
          },
        ],

        green_tea_age: [
          {
            required: false,
            message: "每月饮绿年数必填",
            trigger: "blur",
          },
        ],

        barrett_age: [
          {
            required: false,
            message: "每月花茶数量必填",
            trigger: "blur",
          },
        ],

        low_grade_intraepithelial_neoplasia_age: [
          {
            required: false,
            message: "饮花茶年数必填",
            trigger: "blur",
          },
        ],


        reflux_esophagitis_age: [
          {
            required: false,
            message: "请正确填写工作中是否接触石棉年数",
            trigger: "blur",
          },
        ],

        non_atrophic_gastritis_age: [
          {
            required: false,
            message: "请正确填写工作中触铬酸盐年数",
            trigger: "blur",
          },
        ],

        gastric_and_duodenal_ulcer_age: [
          {
            required: false,
            message: "请正确填写工作中接触焦炉逸散物年数",
            trigger: "blur",
          },
        ],

        gastric_polyp_age: [
          {
            required: false,
            message: "请正确填写工作中是否接触砷年数",
            trigger: "blur",
          },
        ],

        advanced_neoplasia_and_early_cancer_age: [
          {
            required: false,
            message: "请正确填写工作中是否接触氯甲醚",
            trigger: "blur",
          },
        ],

        remnant_stomach_age: [
          {
            required: false,
            message: "请正确填写工作接触氡年数",
            trigger: "blur",
          },
        ],

        gastric_mucosa_age: [
          {
            required: false,
            message: "诊断哮喘年龄必填",
            trigger: "blur",
          },
        ],
        seed_tooth: [
          {
            required: false,
            message: "室内无通风燃料使用年数",
            trigger: "blur",
          },
        ],

        helicobacter_pylori_infection_age: [
          {
            required: false,
            message: "诊断矽肺年龄必填",
            trigger: "blur",
          },
        ],

        hepatitis_frequency: [
          {
            required: false,
            message: "诊断慢性支气管炎年龄必填",
            trigger: "blur",
          },
        ],

        respiratory_tract_age: [
          {
            required: false,
            message: "诊断肺结核年龄必填",
            trigger: "blur",
          },
        ],

        mildew: [
          {
            required: false,
            message: "诊断慢性阻塞性肺病年龄必填",
            trigger: "blur",
          },
        ],

        gardiac_intestinal_metaplasia_age: [
          {
            required: false,
            message: "诊断肺气肿年龄必填",
            trigger: "blur",
          },
        ],















                },
                createLoading: false,
                updateLoading: false,
                uploadImage: false,
            };
        },
        created() {
            if (this.dialogStatus == "update" || this.dialogStatus == "formal") {
                this.user = {...this.rowData};
                this.read();
            }
        },
        computed: {},
        methods: {
            addItem(item) {
                this.form.tumour_json.push(JSON.parse(JSON.stringify(item)));
            },
            deleteItem(index) {
                this.form.tumour_json.splice(index, 1);
            },
            waterSourceChange() {
                if (this.form.water_source != "无") {
                    this.rules.seed_tooth[0].required = true;
                } else {
                    this.rules.seed_tooth[0].required = false;
                    this.form.seed_tooth = "";
                }
            },

            smokeChange(e) {
      console.log(e)
      if (e == '1') {
        this.rules.years_after_operation_for_benign_diseases_age[0].required = true;
        this.rules.smoke_frequency[0].required = true;


      } else if (e == '2') {
        this.rules.smoke_year[0].required = true;
        this.rules.years_after_operation_for_benign_diseases_age[0].required = false;
        this.rules.smoke_frequency[0].required = false;

      } else {
        this.form.years_after_operation_for_benign_diseases_age="";
        this.form.smoke_frequency ="";
        this.form.smoke_year="";
        this.rules.years_after_operation_for_benign_diseases_age[0].required = false;
        this.rules.smoke_frequency[0].required = false;
      }
    },
    smokeChange1(e) {
      if (this.form.gastroenteritis == 1) {
        this.rules.other_illness_frequency[0].required = true;
        this.rules.gastroenteritis_frequency[0].required = true;
    } else if (e == '2') {
        this.rules.anabrosis[0].required = true;
        this.rules.other_illness_frequency[0].required = false;
        this.rules.gastroenteritis_frequency[0].required = false;

      } else {
        this.rules.other_illness_frequency[0].required = false;
        this.rules.gastroenteritis_frequency[0].required = false;

        this.form.other_illness_frequency="";
        this.form.gastroenteritis_frequency ="";
        this.form.anabrosis="";
      }
    },

    smokeChange2(e) {
      if (this.form.anabrosis_frequency == 1) {
        this.rules.beans[0].required = true;
        this.rules.oesophagitis[0].required = true;
      }else if (e == '2') {
        this.rules.oesophagitis_frequency[0].required = true;
        this.rules.beans[0].required = false;
        this.rules.oesophagitis[0].required = false;

      } else {
        this.rules.beans[0].required = false;
        this.rules.oesophagitis[0].required = false;
        this.form.beans="";
        this.form.oesophagitis ="";
        this.form.oesophagitis_frequency="";
      }
    },


    smokeChange3() {
      if (this.form.dental_implant == 1) {
        this.rules.mulled[0].required = true;

      } else {
        this.rules.mulled[0].required = false;

      }
    },


    gastroscopeChange(e) {
      console.log(e);
      if (this.form.drink != 0&&this.form.drink != 4) {
        this.rules.drink_frequency[0].required = true;
        this.rules.drink_year[0].required = true;
      } else {
        this.rules.drink_frequency[0].required = false;
        this.rules.drink_year[0].required = false;
      }
    },

    gastroscopeChange1() {
      if (this.form.drink_tea != 0 &&this.form.drink_tea!= 4) {
        this.rules.drink_tea_frequency[0].required = true;
        this.rules.drink_tea_year[0].required = true;
      } else {
        this.rules.drink_tea_frequency[0].required = false;
        this.rules.drink_tea_year[0].required = false;
      }
    },

    gastroscopeChange2() {
      if (this.form.tobacco!=0 &&this.form.tobacco!=4) {
        this.rules.tobacco_frequency[0].required = true;
        this.rules.tobacco_year[0].required = true;
      } else {
      this.rules.tobacco_frequency[0].required = false;
        this.rules.tobacco_year[0].required = false;
      }
    },



            blackTeachange() {
                if (this.form.black_tea == 1) {
                    this.rules.pernicious_anemia[0].required = true;
                    this.rules.black_tea_age[0].required = true;
                } else {
                    this.rules.pernicious_anemia[0].required = false;
                    this.rules.black_tea_age[0].required = false;
                }
            },

            blackTeachange1() {
                if (this.form.green_tea == 1) {
                    this.rules.pernicious_anemia_age[0].required = true;
                    this.rules.green_tea_age[0].required = true;
                } else {
                    this.rules.pernicious_anemia_age[0].required = false;
                    this.rules.green_tea_age[0].required = false;
                }
            },

            blackTeachange2() {
                if (this.form.barrett == 1) {
                    this.rules.barrett_age[0].required = true;
                    this.rules.low_grade_intraepithelial_neoplasia_age[0].required = true;
                } else {
                    this.rules.barrett_age[0].required = false;
                    this.rules.low_grade_intraepithelial_neoplasia_age[0].required = false;
                }
            },


            refluxesophagitis() {
                if (this.form.reflux_esophagitis == 1) {
                    this.rules.reflux_esophagitis_age[0].required = true;
                } else {
                    this.rules.reflux_esophagitis_age[0].required = false;
                }
            },


            refluxesophagitis1() {
                if (this.form.non_atrophic_gastritis == 1) {
                    this.rules.non_atrophic_gastritis_age[0].required = true;
                } else {
                    this.rules.non_atrophic_gastritis_age[0].required = false;
                }
            },


            refluxesophagitis3() {
                if (this.form.gastric_and_duodenal_ulcer == 1) {
                    this.rules.gastric_and_duodenal_ulcer_age[0].required = true;
                } else {
                    this.rules.gastric_and_duodenal_ulcer_age[0].required = false;
                }
            },


            refluxesophagitis4() {
                if (this.form.gastric_polyp == 1) {
                    this.rules.gastric_polyp_age[0].required = true;
                } else {
                    this.rules.gastric_polyp_age[0].required = false;
                }
            },


            refluxesophagitis5() {
                if (this.form.advanced_neoplasia_and_early_cancer == 1) {
                    this.rules.advanced_neoplasia_and_early_cancer_age[0].required = true;
                } else {
                    this.rules.advanced_neoplasia_and_early_cancer_age[0].required = false;
                }
            },


            refluxesophagitis6() {
                if (this.form.remnant_stomach == 1) {
                    this.rules.remnant_stomach_age[0].required = true;
                } else {
                    this.rules.remnant_stomach_age[0].required = false;
                }
            },


            gastricMucosa() {
                if (this.form.gastric_mucosa == 1) {
                    this.rules.gastric_mucosa_age[0].required = true;
                } else {
                    this.rules.gastric_mucosa_age[0].required = false;
                }
            },
            gastricMucosa1() {
                if (this.form.helicobacter_pylori_infection == 1) {
                    this.rules.helicobacter_pylori_infection_age[0].required = true;
                } else {
                    this.rules.helicobacter_pylori_infection_age[0].required = false;
                }
            },
            gastricMucosa2() {
                if (this.form.hepatitis == 1) {
                    this.rules.hepatitis_frequency[0].required = true;
                } else {
                    this.rules.hepatitis_frequency[0].required = false;
                }
            },
            gastricMucosa3() {
                if (this.form.respiratory_tract == 1) {
                    this.rules.respiratory_tract_age[0].required = true;
                } else {
                    this.rules.respiratory_tract_age[0].required = false;
                }
            },
            gastricMucosa4() {
                if (this.form.deep_fry == 1) {
                    this.rules.mildew[0].required = true;
                } else {
                    this.rules.mildew[0].required = false;
                }
            },
            gastricMucosa5() {
                if (this.form.gardiac_intestinal_metaplasia == 1) {
                    this.rules.gardiac_intestinal_metaplasia_age[0].required = true;
                } else {
                    this.rules.gardiac_intestinal_metaplasia_age[0].required = false;
                }
            },


            tumourChange() {
                if (this.form.tumour == 1) {
                    this.rules.people_number[0].required = true;
                    this.rules.average_revenue[0].required = true;
                } else {
                    this.rules.people_number[0].required = false;
                    this.rules.average_revenue[0].required = false;
                }
            },
            read() {
                readQuestionaires({id: this.user.id}).then((response) => {
                    if (response.code == 200) {
                        this.form.user_id = this.user.id;
                        if (response.data != null) {
                            this.form = response.data;
                            if (response.data.tumour_json != "[]") {
                                this.form.tumour_json = JSON.parse(response.data.tumour_json);
                            } else {
                                this.form.tumour_json = [
                                    {
                                        kinship: "",
                                        name: "",
                                        tumour_name: "",
                                        date: "",
                                        tumour_frequency: "",
                                    },
                                ]
                            }
                        } else {
                            this.form.user_id = this.user.id;
                            this.form.name = this.user.name;
                            this.form.sex = this.user.sex;
                            this.form.sfz = this.user.sfz;
                            this.form = {...this.form}
                            this.form.tumour_json = [
                                {
                                    kinship: "",
                                    name: "",
                                    tumour_name: "",
                                    date: "",
                                    tumour_frequency: "",
                                },
                            ]
                        }

                    }
                });
            },
            //父页面的回调事件
            handleDialogVisible(isUpdate) {
                this.dialogVisible = false;
                this.$emit("childByDialogVisible", this.dialogVisible, isUpdate);
            },
            //创建
            create() {
                this.$refs["dataForm"].validate((valid) => {
                    if (valid) {
                        this.createLoading = true;
                        createQuestionaires(this.form).then((response) => {
                            this.createLoading = false;
                            if (response.code == 200) {
                                this.msgSuccess(response.msg);
                                this.handleDialogVisible(true);
                            }
                        });
                    }
                });
            },
            //修改
            update() {
                this.$refs["dataForm"].validate((valid) => {
                    if (valid) {
                        this.updateLoading = true;
                        updateRqscQuestionaires(this.form).then((response) => {
                            this.updateLoading = false;
                            if (response.code == 200) {
                                this.msgSuccess(response.msg);
                                this.handleDialogVisible(true);
                            }
                        });
                    }
                });
            },
        },
    };
</script>
<style>
    .el-form-item {
        margin: 0;
    }

    .footer {
        width: 100%;
        height: 40px;
        text-align: center;
        margin-top: 20px;
    }
</style>
